package com.mz.mattress.client.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mz.mattress.api.common.Result;
import com.mz.mattress.api.entity.Order;
import com.mz.mattress.client.api.req.SubmitOrderReq;
import com.mz.mattress.client.api.req.UseOrderReq;
import com.mz.mattress.client.api.resp.SubmitOrderResp;

import java.util.List;

public interface OrderService extends PayService {

    //卡次剩余
    Result<IPage<Order>> useListPage(Long memberId, Integer pageNo, Integer pageSize);

    //我的订单
    Result<IPage<Order>> listPage(Long memberId, Integer status, Integer pageNo, Integer pageSize);

    //卡次剩余
    Result<List<Order>> list(Long memberId);

    /**
     * 提交订单
     * @param req
     * @return
     */
    Result<SubmitOrderResp> submit(SubmitOrderReq req);

    Result<Order> detail(Long orderId);

    Result cancel(Long orderId);

    /**
     * 订单绑定设备  消费一次
     * @param req
     * @return 返回消费记录ID
     */
    Result<Integer> bindDevice(UseOrderReq req);

}
